


SET(DOQUMEASURES_EXTRA_DIRS ${ISE_INCLUDE_DIRS})
SET(DOQUMEASURES_EXTRA_LIBS ${ISE_LIBRARIES})

FILE(
	GLOB_RECURSE
	testsCPP
	*.cpp
)

FIND_LIBRARY(CPPUNIT_LIBRARY cppunit
               ${CPPUNIT_INCLUDE_DIR}/../lib
               /usr/local/lib
               /usr/lib)

INCLUDE_DIRECTORIES(${DOQUMEASURES_EXTRA_DIRS})
INCLUDE_DIRECTORIES(${DoQuMeasures_SOURCE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})

FIND_LIBRARY(DoQuMeasures_LIBRARY 
		NAMES DoQuMeasures
		PATHS /usr/local/lib)

MESSAGE(${DoQuMeasures_LIBRARY})

ADD_DEFINITIONS(${ISE_DEFINITIONS})

SET(tests_libs ${DoQuMeasures_LIBRARY} ${DOQUMEASURES_EXTRA_LIBS} ${CPPUNIT_LIBRARY})

ADD_EXECUTABLE(DoQuMeasures-cppunit ${testsCPP})
TARGET_LINK_LIBRARIES(DoQuMeasures-cppunit ${tests_libs})
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/DoQuMeasures-cppunit DESTINATION bin)
